]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
mixer-control: Print error when we fail to update source or sink port
authorGuido Günther <agx@sigxcpu.org>
Sun, 4 Jan 2026 12:07:24 +0000 (13:07 +0100)
committerSimon McVittie <smcv@debian.org>
Wed, 28 Jan 2026 13:25:18 +0000 (13:25 +0000)
Since we allow for port lookups to fail we should check if the update
worked.

Signed-off-by: Guido Günther <agx@sigxcpu.org>
Origin: https://gitlab.gnome.org/GNOME/libgnome-volume-control/-/merge_requests/31
Bug: https://gitlab.gnome.org/GNOME/libgnome-volume-control/-/issues/34
Bug-Debian: https://bugs.debian.org/1126514
Applied-upstream: gnome-shell 50, commit:798230599950607ec285daecd070f5bcb28580e4

Gbp-Pq: Topic libgvc
Gbp-Pq: Name mixer-control-Print-error-when-we-fail-to-update-source-o.patch

subprojects/gvc/gvc-mixer-control.c

index f41c2c141b0e818f2ce12d6ce4443dc593e6e1ab..15eb5e8f8586fd5e99daf988e4daa8b8c2a7b1cf 100644 (file)
@@ -1525,7 +1525,8 @@ update_sink (GvcMixerControl    *control,
                         if (active_port == NULL ||
                             g_strcmp0 (active_port->port, info->active_port->name) != 0) {
                                 g_debug ("update sink - apparently a port update");
-                                gvc_mixer_stream_set_port (stream, info->active_port->name);
+                                if (!gvc_mixer_stream_set_port (stream, info->active_port->name))
+                                        g_warning ("Port update to of %d '%s' failed", info->index, info->active_port->name);
                         }
                 }
         }
@@ -1654,7 +1655,8 @@ update_source (GvcMixerControl      *control,
                         if (active_port == NULL ||
                             g_strcmp0 (active_port->port, info->active_port->name) != 0) {
                                 g_debug ("update source - apparently a port update");
-                                gvc_mixer_stream_set_port (stream, info->active_port->name);
+                                if (!gvc_mixer_stream_set_port (stream, info->active_port->name))
+                                        g_warning ("Port update to of %d '%s' failed", info->index, info->active_port->name);
                         }
                 }
         }